home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d22 / masdir42.arc / SDLSETUP.BAT < prev    next >
Encoding:
DOS Batch File  |  1989-03-08  |  4.4 KB  |  124 lines

  1. ECHO OFF
  2. SDL_ASK B
  3. IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
  4. ECHO SDLSETUP.BAT copyright (c) 1987-1989 Bob Stephan. All rights reserved.
  5. ECHO * * *
  6. ECHO This is a BATCH program so it may be a little slow, but
  7. ECHO you don't have to run it very often so please be patient.
  8. ECHO * * *
  9. SDL_ASK E
  10. IF NOT ERRORLEVEL 12 GOTO ENVIRON
  11. IF NOT EXIST SDL.COM GOTO FILES
  12. SDL @#$.$#@/!
  13. IF ERRORLEVEL 143 GOTO VERSION
  14. IF NOT ERRORLEVEL 142 GOTO VERSION
  15. SDL_ASK F SDL.COM
  16. IF NOT %WHAT% == 290E GOTO VERSION
  17. ECHO This program will modify the file SDL.COM on this disk.
  18. ECHO None of your original files will be modified in any way.  In
  19. ECHO particular, your CONFIG.SYS and AUTOEXEC.BAT will not be touched.
  20. ECHO * * *
  21. ECHO Checking system resources. Please wait.
  22. IF NOT EXIST ISLABEL.EXE GOTO CKDEBUG
  23. ISLABEL MASDIR 4∙2E  >NUL
  24. IF NOT ERRORLEVEL 1 GOTO CKDEBUG
  25. ECHO If this is the original SDL disk you should establish a working
  26. ECHO disk and/or directory to preserve the original (see SDLSETUP.DOC).
  27. ECHO * * *
  28. SDL_ASK C "Are you ready to continue (Y,n)? " YN}~
  29. IF ERRORLEVEL 126 GOTO QUIT
  30. IF NOT ERRORLEVEL 89 GOTO QUIT
  31. :CKDEBUG Test for running DEBUG
  32. IF EXIST DEBUG.COM GOTO CKFILES
  33. IF EXIST DEBUG.TST ERASE DEBUG.TST
  34. ECHO R >debug.txt
  35. ECHO Q >>debug.txt
  36. DEBUG <debug.txt >debug.tst
  37. IF NOT EXIST DEBUG.TST GOTO NODEBUG
  38. IF EXIST DEBUG.T?T ERASE DEBUG.T?T
  39. :CKFILES
  40. FOR %%F IN (SDLPARMS.BAT SDL_ASK.EXE) DO IF NOT EXIST %%F GOTO FILES
  41. FOR %%F IN (SDLDEBUG.BAT SDLFINIS.BAT) DO IF NOT EXIST %%F GOTO FILES
  42. SDL_ASK D
  43. IF ERRORLEVEL 30 GOTO BEGIN
  44. IF NOT ERRORLEVEL 20 GOTO NOT1
  45. ECHO * * *
  46. ECHO If you have any difficulty running SDLSETUP under DOS 2.x,
  47. ECHO please see SDLSETUP.DOC.
  48. ECHO * * *
  49. :BEGIN
  50. ECHO All checks completed, ready to proceed with SETUP.
  51. ECHO * * *
  52. ECHO If you do not want to continue with SDLSETUP press Esc to exit...
  53. SDL_ASK C "Press C to continue, D to read the Documentation first(C,d,Esc): " CD}~
  54. IF ERRORLEVEL 126 GOTO QUIT
  55. IF ERRORLEVEL 125 GOTO CONTINUE
  56. IF ERRORLEVEL 67 IF NOT ERRORLEVEL 68 GOTO CONTINUE
  57. IF NOT EXIST SDLSETUP.DOC GOTO MENTION
  58. SDL_SHOW SDLSETUP.DOC
  59. ECHO Returning to SDLSETUP...
  60. ECHO * * *
  61. GOTO CONTINUE
  62. :MENTION
  63. echo SDLSETUP.DOC was not found and cannot be displayed now.
  64. ECHO You may copy or print SDLSETUP.DOC from the original MASDIR disk.
  65. Pause
  66. :CONTINUE
  67. REM Reset the size in WHAT
  68. SDL_ASK F SDL.COM
  69. SDLPARMS 142 143 %WHAT%
  70. REM Normally the BATch file ends here, the rest are error messages.
  71. GOTO QUIT
  72. :NODEBUG
  73. ECHO * * *
  74. ECHO An error was encountered during the check of system resources.
  75. ECHO If the error message was "File creation error" and/or "File not found"
  76. ECHO it probably means the diskette is write protected.
  77. ECHO * * *
  78. ECHO If the message was "Bad command or file name" it means
  79. ECHO that the system file DEBUG.COM is not available to SDLSETUP.
  80. ECHO This program requires access to the DOS external command file
  81. ECHO DEBUG.COM.  It must be in this directory on this disk or in
  82. ECHO one of the directories on your path, which is
  83. PATH
  84. ECHO Please correct the problem and run SDLSETUP again.
  85. goto quit
  86. :FILES
  87. ECHO * * *
  88. ECHO The following files must be in this current directory on this disk:
  89. FOR %%F IN (SDL.COM SDL_ASK.EXE SDLPARMS.BAT) DO ECHO %%F
  90. FOR %%F IN (SDLSETUP.BAT SDLFINIS.BAT SDLDEBUG.BAT) DO ECHO %%F
  91. GOTO QUIT
  92. :NOT1
  93. ECHO * * *
  94. ECHO SDL and SDLSETUP require DOS 2.0 or higher.
  95. GOTO QUIT
  96. :VERSION
  97. ECHO  
  98. ECHO * * *
  99. ECHO The version of SDL.COM on this disk is incompatible with this
  100. ECHO version of SDLSETUP.  Please copy compatible versions from
  101. ECHO your original MASDIR disk and try again.
  102. GOTO QUIT
  103. :ENVIRON
  104. ECHO * * *
  105. ECHO There is insufficient DOS Environment space to run SDLSETUP.
  106. ECHO You already have the following items set in the environment:
  107. ECHO * * *
  108. SET
  109. ECHO * * *
  110. ECHO SDLSETUP needs about 10 more bytes of space.  You can clear
  111. ECHO one or more of the items out of the environment by entering
  112. ECHO commands like
  113. ECHO SET var=
  114. ECHO Where var is the name of one of the objects shown between the
  115. ECHO lines of asterisks above.  Each name is followed by the = sign.
  116. ECHO When you enter the command do not put anything after the = sign,
  117. ECHO not even a space.  Just press the Enter key (cr) immediately after
  118. ECHO the = key.  Do not clear COMSPEC, PATH, or PROMPT.
  119. ECHO After you have cleared one or more names from the environment,
  120. ECHO run SDLSETUP again.
  121. :QUIT
  122. SET WHAT=
  123. ECHO Exiting to DOS ...
  124.